<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>伪元素</title>
    <style>
        div {
            width: 300px;
            height: 300px;
            background-color: pink;
        }
/* 必须设置concent 属性 没有concent 伪元素选择器不生效 */
        div::before {
            content: "老鼠";
            width: 100px;
            height: 100px;
            background-color: red;
            display: block;
        }

        div::after {
            content: "大米";
            width: 100px;
            height: 100px;
            background-color: aqua;
            display: inline-block;
        }
    </style>
</head>

<body>
    <div>
        啊
    </div>
</body>

</html>